#include<bits/stdc++.h>
#define rep_(i, a, b) for (int i = (a); i <= (b); i++)
using namespace std;
const int maxn = 3e5 + 10;
int n;
int a[maxn], r[maxn];
signed main() {
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	ios::sync_with_stdio(false); cin.tie(0);
	cin >> n;
	rep_(i, 1, n) {
		cin >> a[i];
	}
	sort(a + 1, a + 1 + n);
	int ans = 0;
	for (int i = 1, j = 1; i <= n; i++) {
		while(j <= n && a[j] <= a[i]) j++;
		if (j <= n) ans++, j++;
		else break;
	}
	ans = n - ans;
	cout << ans << endl;
	return 0;
}